Skip to content

[Android] Check if the application is reachable when making an outgoing call via the native application #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 25, 2019

Conversation

manuquentin
Copy link
Contributor

@manuquentin manuquentin commented Sep 16, 2019

Use case :
On Android, the application is in background since more than 20mn. The OS will kill all connection (even between the Java module and Javascript).

We need to have a way to see if the Javascript application is reachable by the Java codebase, for that I've introduced an event checkReachability with a timeout.

It's like a ping between the Java and Javascript codebase.

First case: the application is reachable :

  1. Callkeep triggers checkReachability, then the application reply with setReachable.
  2. After 2s the timeout is triggered but as we received the setReachable method I'll do nothing

Second case: the application is not reachable.

  1. Callkeep triggers checkReachability, the application will not calls setReachable.
  2. After 2s the timeout is triggered but setReachable wasn't called.
  3. CallKeep will wakeup the application (in headless mode) like the application was killed.

@manuquentin manuquentin merged commit f136200 into master Sep 25, 2019
@manuquentin manuquentin deleted the check_reachability branch September 25, 2019 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant